
import { getToken } from "@/utils/auth";
import request from '@/utils/request';
import { getBaseUrl } from '@/utils/ruoyi.js'

// 获取上传文件请求头
export function getUpHeaders () {
  return {
    Authorization: "Bearer " + getToken()
  }
}
// 获取上传文件完整路径
export function getUpfileUrl () {
  const baseURL = getBaseUrl()
  return `${baseURL}/common/upload`
}

// 自定义上传
export function customUpFile (data) {
  return request({
    url: `/common/upload`,
    method: 'post',
    data
  })
}
